//- Copyright (c) 2016 Lucky Byte, Inc.
table.ui.celled.small.compact.table.very.basic.structured.nolayout
  tbody
    - td_style="background-color=#999;"
    tr
      td.center.aligned(rowspan="4" style="width:10px;") 系统信息
      td.right.aligned.collapsing(style="#{td_style}") 序 号
      td.collapsing.positive= record.serial
      td.right.aligned.collapsing 交易时间
      td.collapsing.positive(colspan="2")
        = record.sys_time.format('YYYY-MM-DD HH:mm:ss')
      td.right.aligned.collapsing 交易渠道
      td.collapsing.positive= constant.chnls[record.chnl] || '未知'
      td.right.aligned.collapsing 透传/重组
      td.collapsing.positive= record.indirect ? '重组' : '透传'
      td.right.aligned.collapsing 平台交易
      td.collapsing.positive(colspan="1")= record.trinfo.inner ? '是' : '否'
      td.right.aligned.collapsing UUID / 序号
      td.positive(colspan="4") #{record.uuid} / #{record.uuid_no}

    tr
      td.right.aligned.collapsing 网络通讯
      td.positive(colspan="8")
        if record.netinfo
          | #{record.netinfo.c_addr} / #{record.netinfo.c_port} 
          i.icon.long.arrow.right.grey
          | #{record.netinfo.s_addr} / #{record.netinfo.s_port}
      td.right.aligned.collapsing 清算交易
      td.collapsing.positive(colspan="1")= record.trinfo.settl ? '是' : '否'
      td.right.aligned.collapsing 可冲正
      td.collapsing.positive(colspan="1")= record.trinfo.reversable ? '是' : '否'
      td.right.aligned.collapsing 可撤销
      td.positive(colspan="2")= record.trinfo.revokable ? '是' : '否'

    tr
      td.right.aligned.collapsing 商户信息
      if record.merch
        td.positive(colspan="15") #{record.merch.name || '-'} ｜ 
          | #{record.merch.merno || '-'} ｜ 
          | #{constant.merch_chnls[record.chnl] || '未知渠道'} ｜ 
          | #{record.merch.inside ? '平台商户' : '外联商户'}｜ 
          | #{record.merch.contact || '-'} ｜ 
          | #{record.merch.mobile || '-'} ｜ 
          | #{record.merch.telephone || '-'} ｜ 
          | #{record.merch.address || '-'}
      else
        td.positive(colspan="16") 无
      
    tr(style="border-bottom:2px solid rgb(88,188,88);")
      td.right.aligned.collapsing 状 态
      td.collapsing.positive
        case record.status
          when 0: | 正常
          when 1: | 异常
          default: | 未知
      td.right.aligned.collapsing 交易控制
      td.collapsing.positive= record.trinfo.trctl ? '是' : '否'
      td.right.aligned.collapsing 控制代码
      td.collapsing.positive= record.trinfo.code
      td.right.aligned.collapsing 手续费
      td.collapsing.positive(colspan="1")= record.fee || '-'
      td.right.aligned.collapsing 备 注
      td.positive(colspan="7")= record.notes

    case record.chnl
      when 1
        include detail_1
      when 3
        include detail_3
